<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="my" uri="http://www.trkj.com/tr1702/tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>员工本薪数据</title>
<script type="text/javascript"src="<c:url value="/js/jquery-easyui-1.5.4.2/jquery.min.js"/>"></script>
<script type="text/javascript"src="<c:url value="/js/jquery-easyui-1.5.4.2/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"src="<c:url value="/js/jquery-easyui-1.5.4.2/locale/easyui-lang-zh_CN.js"/>"></script>
<link rel="stylesheet" type="text/css"href="<c:url value="/js/jquery-easyui-1.5.4.2/themes/default/easyui.css"/>" />
<link rel="stylesheet" type="text/css"href="<c:url value="/js/jquery-easyui-1.5.4.2/themes/icon.css"/>" />

<style type="text/css">
	.kontge{
		padding-right: 10px;
	}
</style>
</head>
<body>
	<script type="text/javascript">
		$(function() {
			/* 点击添加进入添加面板 */
			$(".add_emp").linkbutton({onClick : function() {
				$(".trainhomepage_emp").panel({href:"to_emp_pay_add"});
			}});
			$('.mo1').linkbutton({
				onClick : function() {
					$("#win3").dialog("open");
				}
			});
			$('.search_emp_pay').linkbutton({
				onClick : function(){
					$('.lq_emp_pay_add').datagrid({ url: 'emp_pay_search?text='+$('#search_emp_pay_input').val() });//重新指定url
                    $('.lq_emp_pay_add').datagrid('load',{
                    });
				}
			});
		});
		var roleFormatter = function(value,row,index){
			var edit = " <a class='cell_btn_edit' onclick='editRole_emp_pay(" + row.stainId + ")'></a>";
			var del = " <a class='cell_btn_del' onclick='delRole_emp_pay(" + row.stainId + ")'></a>";
			return edit+del;
		}
		$("#lq_emp_pay_tab").datagrid({onLoadSuccess: function(){
			/* $(".cell_btn_edit").linkbutton({iconCls:'icon-edit',height:18, plain:true});
			$(".cell_btn_del").linkbutton({iconCls:'icon-cancel',height:18, plain:true}); */
		}});
	</script>
	<div class="easyui-panel trainhomepage_emp"  data-options="fit:true,border:false">
		<!-- 按钮 -->
		<div id="bt_emp">
         	<my:g id="128" ><a id="insert" class="easyui-linkbutton add_emp" data-options="iconCls:'icon-add',text:'新增',width:80"></a></my:g>
			<span class="kontge"></span>
			<a class="easyui-linkbutton" data-options="iconCls:'icon-reload'"></a>
			<a class="easyui-linkbutton" data-options="iconCls:'icon-print'"></a>
			<span class="kontge"></span>
			<input class="easyui-textbox" name="dept"
								data-options="label:'薪资账套', width:250,labelWidth:60" />
								<button class="easyui-linkbutton mo1"
									data-options="iconCls:'icon-search',"></button>
			<span class="kontge"></span>
			<a id="search_emp_pay_input" class="easyui-textbox" data-options="label:'搜索文本',width:200,labelWidth:60,prompt:'员工编号，名称'"></a>
			<a class="easyui-linkbutton search_emp_pay" data-options="iconCls:'icon-search',text:'搜索'"></a>
		</div>
		
		<!-- 数据表 -->
		<table id="lq_emp_pay_tab" class="easyui-datagrid lq_emp_pay_add" data-options="
			fit:true,
			singleSelect:true,
			nowrap:true,
			url:'selcet_emp_pay',
			toolbar:'#bt_emp',
			rownumbers:true,
			
			<!-- 分页 -->
			pagination:true,
			<!-- ulr: -->
			pageSize:5,
			pageList:[5,10,15]
		">
			<thead>
				<tr>
					<th data-options="field:'accountName',width:100">薪资账套</th>
					<th data-options="field:'stainId',width:100">员工编号</th>
					<th data-options="field:'stainName',width:100">员工名称</th>
					<th data-options="field:'accountStartdate',width:150">开始日期</th>
					<th data-options="field:'accountEnddate',width:150">结束日期</th>
					<th data-options="field:'xxx',width:200,formatter: roleFormatter">操作</th>
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>
	</div>
		<!-- 弹框选择模块 -->
		<div id="win3" class="easyui-dialog"
				data-options="width:500,
						height:450,
						title:'清单查找',
						modal:true,
						closed:true,
						buttons:[{
					text:'保存',
					handler:function(){
					
					}
				},{
					text:'关闭',
					handler:function(){
						$('#win3').dialog('close');
					}
				}]">

				<table id="tables" class="easyui-datagrid"
					data-options="
			pagination:true,
			pageSize:1,
			pageList:[1,2,3,4,5],
			url:'',
			method:'get',
			fitColumns:true,
			fit:true,
			nowrap:false,
			autoRowHeight:true,
			rownumbers:true,
			singleSelect:true,
			striped:true
		">
					<thead>
						<div style="background:#CEDEFA;padding-left: 20px;">
							<input class="easyui-textbox" 
								data-options="label:'  模板编号：',width:220,labelWidth:130" />
							<button class="easyui-linkbutton"
								data-options="text:'模糊搜索' "></button><br>
							<input class="easyui-textbox" 
								data-options="label:'  模板名称：',width:220,labelWidth:130" />
							<button class="easyui-linkbutton"
								data-options="text:'搜索',"></button>
						</div>
						<tr>
							<th data-options="field:'a',width:50">模板编号</th>
							<th data-options="field:'b',width:50">模板名称</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td name="name">001</td>
							<td>名称1</td>
						</tr>
						<tr>
							<td>001</td>
							<td>名称1</td>
						</tr>
					</tbody>
				</table>
			</div>
			
				
<!-- 修改 -->
	<div id="update-rule_result_z" class="easyui-dialog" title="规则结果"
		data-options="
         width:440,
         height:360,
	     resizable:false,
	     modal:true,
	     closed:true,
	     buttons:[{
				text:'保存',
				width:60,
				handler:function(){
					$('#rule_result_update_a').form({
					    
						url:'lzs_SalarySablexiugai',
						onSubmit:function(params){
						
						},
						success:function(v){
							v = eval('('+v +')');
							if(v.success){
								$.messager.alert('恭喜', '修改成功');
								$('#aa_lzs').datagrid('reload');
							}else{
								$.messager.alert('错误', '对不起，操作失败，原因：' + v.message);
							}
						$.messager.progress('close');// 如果提交成功则隐藏进度条
						
						$('#rule_result_add').form('reset');
						$('#update-rule_result_z').dialog('close');
						}
					}).submit();
				}
				},{
				text:'取消',
				width:60,	
				handler:function(){
					$('#update-rule_result_z').dialog('close');
				}
			}]
        ">
		<div style="margin-left: 21%; margin-top: 10px;">
			<form action="" class="rule_result_update_a" id="rule_result_update_a" style="text-align: right;">
				<table>
					<tr style="display:none;">
						<td><span style="color: red;">*</span>模板编号</td>
						<td><input class="easyui-textbox"
							name="templateId" data-options="required:true" id="rule_result_id_update"> </td>
					</tr>
					<tr>
						<td><span style="color: red;">*</span>模板名称</td>
						<td><input class="easyui-textbox"
							name="templateName" data-options="required:true" id="rule_result_name_update"></td>
					</tr>
					<tr>
						<td><span style="color: red;">*</span>版本数</td>
						<td><input class="easyui-textbox"
							name="varsionNumber" data-options="required:true" id="rule_result_name_update"></td>
					</tr>
						<tr>
						<td><span style="color: red;">*</span>创建者</td>
						<td><input class="easyui-textbox"
							name="templatePerson" data-options="required:true" id="rule_result_name_update"></td>
					</tr>
			
					
			
					
						<tr>
						<td><span style="color: red;"> </span>审核日期</td>
						<td><input class="easyui-datetimebox" name="templateCreatordate"></td>
					</tr>
					
					
					<tr>
						<td><span style="color: red;"> </span></td>
						<td><span style="padding-right:5px;">停用</span>
						<input name="attruState" type="checkbox" value='1' id="rule_result_check_update">
					</tr>
				</table>
			</form>
		</div>
	</div> 
</body>
</html>
</body>
</html>